package com.yun.algorithmproblem.leetcode;

public class Leetcode2595 {

    public int[] evenOddBit(int n) {
        int[] res = new int[2];
        int index = 0;
        while (n > 0) {
            res[index] += n & 1;
            n = n >> 1;
            index = (index + 1) % 2;
        }
        return res;
    }
}
